package com.changgou.order.dao;

import com.changgou.order.pojo.Order;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;
import java.util.Map;

public interface OrderMapper extends Mapper<Order> {

    @Select("select count(*) from tb_order where order_status=#{order_status}")
    int findCountByOrderStatus(@Param("order_status") String order_status);

    @Select("select sum(pay_money) from tb_order where pay_time <= #{lastDate} and pay_time >= #{firstDate}")
    Integer findMemberCountBeforeDate(@Param("firstDate") String firstDate,@Param("lastDate") String lastDate);
}
